package org.example.core.mysql.convert;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;

/**
 * Description:
 * Date: 2024/2/3 01:42
 */
public class JSONArrayToStringConvert extends AbstractConvert{
    @Override
    public Object convert(Object value) {
        if (value instanceof JSONArray){
            return ((JSONArray) value).toJSONString();
        }else if (value instanceof String){
            return JSONArray.parseArray((String) value);
        }
        return value;
    }
}
